<?php
/**
 * Niushop商城系统 - 团队十年电商经验汇集巨献!
 * =========================================================
 * Copy right 2019-2029 上海牛之云网络科技有限公司, 保留所有权利。
 * ----------------------------------------------
 * 官方网址: https://www.niushop.com

 * =========================================================
 */

namespace app\event;

use app\model\web\DiyView as DiyViewModel;


/**
 * 增加默认自定义数据：网站主页、商品分类、底部导航
 */
class AddSiteDiyView
{

    public function handle($param)
    {
        if (!empty($param[ 'site_id' ])) {

            $diy_view_model = new DiyViewModel();

            // 添加自定义主页装修
            $value = json_encode([
                'global' => [
                    'title' => '优选团购商城',
                    'bgColor' => '#f8f8f8',
                    'topNavColor' => '#f59689',
                    'topNavbg' => true,
                    'textNavColor' => '#ffffff',
                    'topNavImg' => '',
                    'moreLink' => [
                    ],
                    'openBottomNav' => true,
                    'navStyle' => 3,
                    'textImgStyleLink' => '1',
                    'textImgPosLink' => 'left',
                    'mpCollect' => false,
                    'popWindow' => [
                        'imageUrl' => '',
                        'count' => -1,
                        'link' => [
                            'name' => '',
                        ],
                        'imgWidth' => '',
                        'imgHeight' => '',
                    ],
                    'bgUrl' => 'public/diy_view/style1/img/bg_img.png',
                    'imgWidth' => '240',
                    'imgHeight' => '70',
                ],
                'value' => [
                    [
                        'height' => 10,
                        'backgroundColor' => '',
                        'marginLeftRight' => 0,
                        'addon_name' => '',
                        'type' => 'HORZ_BLANK',
                        'name' => '辅助空白',
                        'controller' => 'HorzBlank',
                        'is_delete' => '0',
                    ],
                    [
                        'style' => '2',
                        'styleName' => '风格二',
                        'backgroundColor' => '',
                        'textColor' => '#ffffff',
                        'defaultTextColor' => '#333333',
                        'addon_name' => '',
                        'type' => 'COMMUNITY_CHANGE',
                        'name' => '团长切换',
                        'controller' => 'CommunityShow',
                        'is_delete' => '0',
                    ],
                    [
                        'height' => 10,
                        'backgroundColor' => '',
                        'marginLeftRight' => 0,
                        'addon_name' => '',
                        'type' => 'HORZ_BLANK',
                        'name' => '辅助空白',
                        'controller' => 'HorzBlank',
                        'is_delete' => '0',
                    ],
                    [
                        'selectedTemplate' => 'carousel-posters',
                        'imageClearance' => 0,
                        'imageRadius' => 'fillet',
                        'carouselChangeStyle' => 'circle',
                        'marginTop' => 0,
                        'padding' => 0,
                        'height' => 0,
                        'list' => [
                            [
                                'imageUrl' => 'public/diy_view/style1/img/adv_01.png',
                                'title' => '',
                                'link' => [
                                ],
                                'imgWidth' => '690',
                                'imgHeight' => '250',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/adv_02.png',
                                'title' => '',
                                'link' => [
                                ],
                                'imgWidth' => '690',
                                'imgHeight' => '250',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/adv_03.png',
                                'title' => '',
                                'link' => [
                                ],
                                'imgWidth' => '690',
                                'imgHeight' => '250',
                            ],
                        ],
                        'addon_name' => '',
                        'type' => 'IMAGE_ADS',
                        'name' => '图片广告',
                        'controller' => 'ImageAds',
                        'is_delete' => '0',
                    ],
                    [
                        'height' => 14,
                        'backgroundColor' => '',
                        'marginLeftRight' => 0,
                        'addon_name' => '',
                        'type' => 'HORZ_BLANK',
                        'name' => '辅助空白',
                        'controller' => 'HorzBlank',
                        'is_delete' => '0',
                    ],
                    [
                        'selectedTemplate' => 'single-graph',
                        'imageClearance' => 0,
                        'imageRadius' => 'right-angle',
                        'carouselChangeStyle' => 'circle',
                        'marginTop' => 0,
                        'padding' => 0,
                        'height' => 0,
                        'list' => [
                            [
                                'imageUrl' => 'public/diy_view/style1/img/adv_04.png',
                                'title' => '',
                                'link' => [
                                ],
                                'imgWidth' => '690',
                                'imgHeight' => '27',
                            ],
                        ],
                        'addon_name' => '',
                        'type' => 'IMAGE_ADS',
                        'name' => '图片广告',
                        'controller' => 'ImageAds',
                        'is_delete' => '0',
                    ],
                    [
                        'height' => 12,
                        'backgroundColor' => '',
                        'marginLeftRight' => 0,
                        'addon_name' => '',
                        'type' => 'HORZ_BLANK',
                        'name' => '辅助空白',
                        'controller' => 'HorzBlank',
                        'is_delete' => '0',
                    ],
                    [
                        'height' => 0,
                        'backgroundColor' => '',
                        'marginLeftRight' => 0,
                        'addon_name' => '',
                        'type' => 'HORZ_BLANK',
                        'name' => '辅助空白',
                        'controller' => 'HorzBlank',
                        'is_delete' => '0',
                    ],
                    [
                        'selectedTemplate' => 'single-graph',
                        'imageClearance' => 0,
                        'imageRadius' => 'right-angle',
                        'carouselChangeStyle' => 'circle',
                        'marginTop' => 10,
                        'padding' => 0,
                        'height' => 0,
                        'list' => [
                            [
                                'imageUrl' => 'public/diy_view/style1/img/adv_05.png',
                                'title' => '',
                                'link' => [
                                ],
                                'imgWidth' => '690',
                                'imgHeight' => '137',
                            ],
                        ],
                        'addon_name' => '',
                        'type' => 'IMAGE_ADS',
                        'name' => '图片广告',
                        'controller' => 'ImageAds',
                        'is_delete' => '0',
                    ],
                    [
                        'textColor' => '#303133',
                        'defaultTextColor' => '#666666',
                        'backgroundColor' => '',
                        'selectedTemplate' => 'imageNavigation',
                        'showType' => '5',
                        'scrollSetting' => 'fixed',
                        'padding' => 20,
                        'marginTop' => 5,
                        'list' => [
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon1.png',
                                'title' => '新鲜蔬菜',
                                'link' => [
                                    'id' => 11539,
                                    'addon_name' => 'pintuan',
                                    'name' => '',
                                    'title' => '新鲜蔬菜',
                                    'parent' => 'PINTUAN',
                                    'sort' => 0,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=1',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 1,
                                    'category_name' => '新鲜蔬菜',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon1.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 1,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon2.png',
                                'title' => '肉禽蛋品',
                                'link' => [
                                    'id' => 11536,
                                    'addon_name' => 'groupbuy',
                                    'name' => '',
                                    'title' => '肉禽蛋品',
                                    'parent' => 'GROUPBUY',
                                    'sort' => 1,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=2',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 2,
                                    'category_name' => '肉禽蛋品',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon2.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 2,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon3.png',
                                'title' => '海鲜水产',
                                'link' => [
                                    'id' => 11543,
                                    'addon_name' => 'seckill',
                                    'name' => '',
                                    'title' => '海鲜水产',
                                    'parent' => 'SECKILL',
                                    'sort' => 2,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=3',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 3,
                                    'category_name' => '海鲜水产',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon3.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 3,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon4.png',
                                'title' => '时令水果',
                                'link' => [
                                    'id' => 3541,
                                    'addon_name' => 'pointexchange',
                                    'name' => '',
                                    'title' => '时令水果',
                                    'parent' => 'INTEGRAL',
                                    'sort' => 3,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=4',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 4,
                                    'category_name' => '时令水果',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon4.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 4,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon5.png',
                                'title' => '乳品烘焙',
                                'link' => [
                                    'id' => 3532,
                                    'addon_name' => 'topic',
                                    'name' => '',
                                    'title' => '乳品烘焙',
                                    'parent' => 'THEMATIC_ACTIVITIES',
                                    'sort' => 4,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=5',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 5,
                                    'category_name' => '乳品烘焙',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon5.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 5,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon6.png',
                                'title' => '粮油调味',
                                'link' => [
                                    'id' => 11532,
                                    'addon_name' => 'bargain',
                                    'name' => '',
                                    'title' => '粮油调味',
                                    'parent' => 'BARGAIN',
                                    'sort' => 5,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=6',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 6,
                                    'category_name' => '粮油调味',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon6.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 6,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon7.png',
                                'title' => '速食冻品',
                                'link' => [
                                    'id' => 11556,
                                    'addon_name' => 'live',
                                    'name' => '',
                                    'title' => '速食冻品',
                                    'parent' => 'LIVE',
                                    'sort' => 6,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=7',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 7,
                                    'category_name' => '速食冻品',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon7.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 7,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon8.png',
                                'title' => '休闲零食',
                                'link' => [
                                    'id' => 11545,
                                    'addon_name' => 'coupon',
                                    'name' => '',
                                    'title' => '休闲零食',
                                    'parent' => 'COUPON_LIST',
                                    'sort' => 7,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=8',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 8,
                                    'category_name' => '休闲零食',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon8.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 8,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                    'selected' => true,
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon9.png',
                                'title' => '酒水冲调',
                                'link' => [
                                    'id' => 11504,
                                    'addon_name' => '',
                                    'name' => '',
                                    'title' => '酒水冲调',
                                    'parent' => 'BASICS_LINK',
                                    'sort' => 8,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=9',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'selected' => true,
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 9,
                                    'category_name' => '酒水冲调',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon9.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 9,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/icon10.png',
                                'title' => '日用百货',
                                'link' => [
                                    'id' => 11505,
                                    'addon_name' => '',
                                    'name' => '',
                                    'title' => '日用百货',
                                    'parent' => 'BASICS_LINK',
                                    'sort' => 9,
                                    'level' => 1,
                                    'web_url' => '',
                                    'wap_url' => '/pages/goods/category/category?category_id=10',
                                    'icon' => '',
                                    'support_diy_view' => '',
                                    'selected' => true,
                                    'parents' => 'GOODS_CATEGORY',
                                    'category_id' => 10,
                                    'category_name' => '日用百货',
                                    'short_name' => '',
                                    'pid' => 0,
                                    'is_show' => 0,
                                    'image' => 'public/diy_view/style1/img/icon10.png',
                                    'attr_class_name' => '',
                                    'category_id_1' => 10,
                                    'category_id_2' => 0,
                                    'category_id_3' => 0,
                                    'commission_rate' => '0.00',
                                ],
                                'imgWidth' => '109',
                                'imgHeight' => '109',
                            ],
                        ],
                        'addon_name' => '',
                        'type' => 'GRAPHIC_NAV',
                        'name' => '图文导航',
                        'navRadius' => 'fillet',
                        'controller' => 'GraphicNav',
                        'is_delete' => '0',
                    ],
                    [
                        'style' => '2',
                        'backgroundColor' => '',
                        'marginTop' => 8,
                        'styleName' => '风格一',
                        'bgSelect' => 'red',
                        'changeType' => 1,
                        'paddingLeftRight' => 0,
                        'isShowGoodsName' => 1,
                        'isShowGoodsDesc' => 0,
                        'isShowGoodsPrice' => 1,
                        'isShowGoodsPrimary' => 1,
                        'isShowGoodsStock' => 0,
                        'list' => [
                            'imageUrl' => 'public/diy_view/style2/img/title1.png',
                            'title' => '秒杀专区',
                        ],
                        'listMore' => [
                            'imageUrl' => '',
                            'title' => '更多秒杀',
                        ],
                        'titleTextColor' => '#000',
                        'defaultTitleTextColor' => '#000',
                        'moreTextColor' => '#858585',
                        'defaultMoreTextColor' => '#858585',
                        'addon_name' => 'seckill',
                        'type' => 'SECKILL_LIST',
                        'name' => '秒杀',
                        'controller' => 'Seckill',
                        'is_delete' => '0',
                    ],
                    [
                        'height' => 10,
                        'backgroundColor' => '',
                        'marginLeftRight' => 0,
                        'addon_name' => '',
                        'type' => 'HORZ_BLANK',
                        'name' => '辅助空白',
                        'controller' => 'HorzBlank',
                        'is_delete' => '0',
                    ],
                    [
                        'selectedTemplate' => 'row1-of2',
                        'backgroundColor' => '',
                        'list' => [
                            [
                                'imageUrl' => 'public/diy_view/style1/img/adv_06.png',
                                'link' => [
                                ],
                                'imgWidth' => '331',
                                'imgHeight' => '271',
                            ],
                            [
                                'imageUrl' => 'public/diy_view/style1/img/adv_07.png',
                                'link' => [
                                ],
                                'imgWidth' => '331',
                                'imgHeight' => '271',
                            ],
                        ],
                        'selectedRubikCubeArray' => [
                        ],
                        'diyHtml' => '',
                        'customRubikCube' => 4,
                        'heightArray' => [
                            '74.25px',
                            '59px',
                            '48.83px',
                            '41.56px',
                        ],
                        'imageGap' => 15,
                        'addon_name' => '',
                        'type' => 'RUBIK_CUBE',
                        'name' => '魔方',
                        'controller' => 'RubikCube',
                        'is_delete' => '0',
                    ],
                    [
                        'selectColor' => '#FF6706',
                        'nsSelectColor' => '#303133',
                        'list' => [
                            [
                                'goodsStyle' => 1,
                                'title' => '新鲜蔬菜',
                                'desc' => '新鲜蔬菜',
                                'link' => [
                                ],
                                'sources' => 'category',
                                'categoryId' => '1',
                                'categoryName' => '新鲜蔬菜',
                                'goodsId' => [
                                ],
                            ],
                            [
                                'goodsStyle' => 1,
                                'title' => '肉禽蛋品',
                                'desc' => '肉禽蛋品',
                                'link' => [
                                ],
                                'sources' => 'category',
                                'categoryId' => '2',
                                'categoryName' => '肉禽蛋品',
                                'goodsId' => [
                                ],
                            ],
                            [
                                'goodsStyle' => 1,
                                'title' => '海鲜水产',
                                'desc' => '海鲜水产',
                                'link' => [
                                ],
                                'sources' => 'category',
                                'categoryId' => '3',
                                'categoryName' => '海鲜水产',
                                'goodsId' => [
                                ],
                            ],
                            [
                                'goodsStyle' => 1,
                                'title' => '时令水果',
                                'desc' => '时令水果',
                                'link' => [
                                ],
                                'sources' => 'category',
                                'categoryId' => '4',
                                'categoryName' => '时令水果',
                                'goodsId' => [
                                ],
                            ],
                            [
                                'goodsStyle' => 1,
                                'title' => '乳品烘焙',
                                'desc' => '乳品烘焙',
                                'link' => [
                                ],
                                'sources' => 'category',
                                'categoryId' => '5',
                                'categoryName' => '乳品烘焙',
                                'goodsId' => [
                                ],
                            ],
                            [
                                'goodsStyle' => 1,
                                'title' => '粮油调味',
                                'desc' => '粮油调味',
                                'link' => [
                                ],
                                'sources' => 'category',
                                'categoryId' => '6',
                                'categoryName' => '粮油调味',
                                'goodsId' => [
                                ],
                            ],
                        ],
                        'goodsCount' => '6',
                        'style' => 1,
                        'backgroundColor' => '',
                        'marginTop' => 14,
                        'addon_name' => '',
                        'type' => 'MANY_GOODS_LIST',
                        'name' => '多商品组',
                        'controller' => 'ManyGoodsList',
                        'is_delete' => '0',
                    ],
                ],
            ]);

            // 网站主页
            $data = [
                [
                    'site_id' => $param[ 'site_id' ],
                    'title' => '网站主页',
                    'name' => 'DIYVIEW_INDEX',
                    'type' => 'shop',
                    'value' => $value
                ],
                [
                    'site_id' => $param[ 'site_id' ],
                    'title' => '商品分类',
                    'name' => "DIYVIEW_GOODS_CATEGORY",
                    'type' => "shop",
                    'value' => json_encode([
                        "global" => [
                            "title" => "商品分类",
                            "openBottomNav" => false,
                            "bgColor" => "#ffffff",
                            "bgUrl" => ""
                        ],
                        "value" => [
                            [
                                "addon_name" => "",
                                "type" => "GOODS_CATEGORY",
                                "name" => "商品分类",
                                "controller" => "GoodsCategory",
                                "level" => 3,
                                "template" => 2
                            ]
                        ]
                    ])
                ]
            ];

            $res = $diy_view_model->addSiteDiyViewList($data);

            $diy_view_bottom_nav = [
                "type" => 1,
                "backgroundColor" => "#ffffff",
                "textColor" => "#000000",
                "textHoverColor" => "#fa0036",
                "bulge" => true,
                "list" => [
                    [
                        "iconPath" => "upload/default/diy_view/bottom/index.png",
                        "selectedIconPath" => "upload/default/diy_view/bottom/index_selected.png",
                        "text" => "首页",
                        "link" => [
                            "addon_name" => "",
                            "addon_title" => null,
                            "name" => "INDEX",
                            "title" => "主页",
                            "web_url" => "",
                            "wap_url" => "/pages/index/index/index",
                            "icon" => "",
                            "addon_icon" => null,
                            "selected" => false,
                            "type" => 0
                        ]
                    ],
                    [
                        "iconPath" => "upload/default/diy_view/bottom/category.png",
                        "selectedIconPath" => "upload/default/diy_view/bottom/category_selected.png",
                        "text" => "分类",
                        "link" => [
                            "addon_name" => "",
                            "addon_title" => null,
                            "name" => "GOODS_CATEGORY",
                            "title" => "商品分类",
                            "web_url" => "",
                            "wap_url" => "/pages/goods/category/category",
                            "icon" => "",
                            "addon_icon" => null,
                            "selected" => false
                        ]
                    ],
                    [ "iconPath" => "upload/default/diy_view/bottom/cart.png",
                      "selectedIconPath" => "upload/default/diy_view/bottom/cart_selected.png",
                      "text" => "购物车",
                      "link" => [
                          "addon_name" => "",
                          "addon_title" => null,
                          "name" => "GOODS_CART",
                          "title" => "购物车",
                          "web_url" => "",
                          "wap_url" => "/pages/goods/cart/cart",
                          "icon" => "",
                          "addon_icon" => null,
                          "selected" => false
                      ],
                    ],
                    [ "iconPath" => "upload/default/diy_view/bottom/member_index.png",
                      "selectedIconPath" => "upload/default/diy_view/bottom/member_index_selected.png",
                      "text" => "我的",
                      "link" => [
                          "addon_name" => "",
                          "addon_title" => null,
                          "name" => "MEMBER_INDEX",
                          "title" => "会员中心",
                          "web_url" => "",
                          "wap_url" => "/pages/member/index/index",
                          "icon" => "",
                          "addon_icon" => null,
                          "selected" => false
                      ]
                    ]
                ]

            ];

            //底部导航
            $result = $diy_view_model->setBottomNavConfig(json_encode($diy_view_bottom_nav), $param[ 'site_id' ]);

            return $res;

        }

    }

}